import { createRouter, createWebHistory } from 'vue-router'
import Layout from "@/layout/index.vue";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      component: Layout,
      redirect: '/zppweb/tools',
      hidden: true,
      children: [
        {
          path: '/zppweb/tools',
          component: () => import('@/views/tools/index.vue')
        },
        {
          path: '/zppweb/notes',
          component: () => import('@/views/notes/index.vue')
        },
        {
          path: '/zppweb/games',
          component: () => import('@/views/games/index.vue')
        },
        {
          path: '/zppweb/relax',
          component: () => import('@/views/relax/index.vue')
        },
        {
          path: '/zppweb/demos',
          component: () => import('@/views/demos/index.vue')
        },
      ]
    },
    {
      path: '/:pathMatch(.*)*',
      redirect: '/zppweb/tools',
      hidden: true
    }
  ]
})

export default router
